package pkmn.move;

import pkmn.battle.BattlePokemon;
import pkmn.exception.DeathException;

public abstract class IndirectAction {

    public abstract void execute(BattlePokemon battlePokemon) throws DeathException;

    @Override
    public String toString(){
        return this.getClass().getSimpleName();
    }

    public static IndirectAction newByName(String name) throws Exception {
        Class classe = Class.forName("pkmn.move." + name);
        return (IndirectAction) classe.newInstance();
    }
}
